"""
第6章配置：使用 pydantic-settings 进行多环境管理
"""
from pydantic_settings import BaseSettings, SettingsConfigDict
from typing import Literal

class AppSettings(BaseSettings):
    model_config = SettingsConfigDict(env_file=".env", env_prefix="APP_", case_sensitive=False)

    env: Literal["dev", "stg", "prod"] = "dev"
    app_name: str = "Advanced Chapter"
    debug: bool = True
    chunk_size: int = 1024 * 64

settings = AppSettings()
